<template>
     <div>
      <p>用户名：</p>
      <p>
        <input v-model="name" placeholder="用户名" type="text">
      </p>
      <p>评论内容：</p>
      <p>
        <textarea v-model="info"></textarea>
      </p>
      <p class="tr">
        <button @click="onTijiao">提交</button>
      </p>
    </div>
</template>

<script setup>
import { ref,defineEmits } from 'vue';
const emits = defineEmits();
const name = ref('秦始皇');
const info = ref('vue比造长城还难');

const onTijiao = ()=>{
  emits('onAdd',name.value,info.value);
}
</script>

<style lang="scss" scoped>

</style>